package Third;

public class ManageWealthAccount extends Account{
	
	int days;//时间
	
	public ManageWealthAccount(String id, double balance, int days, double rate) {
		super(id,balance,rate);
	    this.days = days;
	}
	public double calculate() {
		return Balance*days*(Rate/365);
	}
	public String toString() {
		return "account:"+Id+" balance:"+String.format("%.2f",Balance)+" days:"+days+" interest:"+String.format("%.2f",this.calculate())+" (rate:"+String.format("%.2f",Rate*100)+"%)\n";
	}
}
